<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script type="text/javascript" src="${staticPath}/js/decimalinput.js"></script>
<script type="text/javascript"src="${staticPath}/js/selectBerth.js"></script>
<script type="text/javascript">
	$(function(){
		var i=0;
		ckBox();
	    
	    $("a").click(function(){
	    	ckBox();
	    })
	})	
	
	function ckBox(){
	 	$("input[name='berthCheck']:checkbox").each(function(){ 		//将之前选中的商铺自动勾选上。
 	    	var check_mechId = $(this).val();
 	    	var shopIds = $("#shopIds").val().split(",");
 	    	for(var k=0; k<shopIds.length; k++){
 	    		if(check_mechId == shopIds[k]){
 	    			$(this).attr("checked", "checked");
 	    		}
 	    	}
 		});
	}
</script>
<div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                 <h4 class="modal-title">铺位信息</h4>
            </div>
             <div class="modal-header">
             	
                <input type="text" id="berthid" name="berthId" maxlength="200" placeholder="铺位号"/>
                 <input type="text" id="mechid" name="mechId" maxlength="200" placeholder="招商编号"/>
                <button type="button" id="queryBerth" class="btn btn-success btn-sm Paging_3">查询</button>
            </div>			<!-- /modal-header -->
            <div class="modal-body">
            <table class="table  table-hover">  
            	<thead>
            	<tr>
            		<td><input type="checkbox" disabled="disabled"></td>
            		<td>铺位号</td>
            		<td>招商编号</td>
            		<!-- <td>门店</td>
            		<td>楼层</td> -->
            		<td>面积</td>
				</tr>
				</thead>
				<tbody id="pageTbody_berth">
				<c:forEach items="${page.list }" var="berthMaindata" varStatus="i">
					<tr onload="test()">
						<td><input type="checkbox" name="berthCheck" onclick="olkValue(this)" value="${berthMaindata.mechId }" datearea="${berthMaindata.area}" ></td>
	            		<td>${berthMaindata.berthId }</td>
	            		<td>${berthMaindata.mechId }</td>
	            		<%-- <td>${berthMaindata.siteid }</td>
	            		<td>${berthMaindata.floor }</td> --%>
	            		<td id="${i.index}"><label id="area_${berthMaindata.mechId}">${berthMaindata.area}</label></td>
	            		<td style="display: none;">
	            			<label id="adLength${i.index }">${berthMaindata.adLength}</label>
	            			<label id="adWeight${i.index }">${berthMaindata.adWeight}</label>
	            			<label id="adStandardvalue${i.index }">${berthMaindata.adStandardvalue}</label>
	            			<label id="berthId${i.index }">${berthMaindata.berthId}</label>
	            		</td>
					</tr>
				</c:forEach>
				</tbody>
			</table>
			 <div class="Paging">
             <div class="col-xs-6">
             		<input type="hidden" id="pageNo_berth" value="${page.pageNo}">
             		<input type="hidden" id="pageSize_berth" value="${page.pageSize}">
             		<input type="hidden" id="total_berth" value="${page.total}">
                  <ul class="pagination">
						<li><a href="#" id="lastPage_berth" >&laquo;&nbsp;上一页</a>
						</li>
                      	<li><a href="#" id="nextPage_berth">下一页&nbsp;&raquo;</a></li>
                  </ul>
             </div>
             <div class="col-xs-6">
                  <div class="pull-right">
                       <span class="Paging_2" id="pageNoSpan_berth">第${page.pageNo}页</span>&nbsp;&nbsp;
                       <span class="Paging_2" id="totalSizeSpan_berth">共${totalSize}页</span>
                       <span>到</span><input class="form-control_1 input-sm input-goto MaoYe-form-TiaoZhuan" id="gotoPageNo_berth" name="gotoPageNo" type="text">
                       <span>页</span>
                       <button type="button" id="goto_berth" class="btn btn-default btn-sm Paging_3">跳转</button>
                  </div>
             </div>
        </div> 
            </div>			
            <!-- /modal-body -->
            <div class="modal-footer">
                <button type="button" id="ok"  onclick="setShopValue()" data-dismiss="modal"  class="btn btn-primary" onclick="">确定</button>
                 <button type="button"  class="btn btn-default" data-dismiss="modal">关闭</button>
            </div>			
            <!-- /modal-footer -->
        </div>         
        <!-- /modal-content -->
    </div>     
</body>